<template>
	<div>
		<div class="title">热销推荐</div>
		<ul>
			<router-link class="item border-bottom" v-for="item of recommendList" :key="item.id" tag="li" :to="'/detail/'+ item.id" >
				<img :src="item.imgUrl" :alt="item.title" class="item-img">
				<div class=item-info>
					<p class="item-title">{{item.title}}</p>
					<p class="item-desc">{{item.desc}}</p>
					<button class="item-button">查看详情</button>
				</div>
			</router-link>
			</router-link>
		</ul>
	</div>
</template>
div+h1
<script>
export default{
	name:'HomeRecommend',
	props:{
		recommendList:Array
	}
	// data() {
	// 	return{
	// 		recommendList:[
	// 			{id:'0001',imgUrl:'http://img1.qunarzz.com/sight/p0/1611/20/205db6ee32a4a29ba3.water.jpg_200x200_0ce2204c.jpg',title:'海立方海洋公园',desc:'小伙伴们都收藏了，去看看吧'},
	// 			{id:'0002',imgUrl:'http://img1.qunarzz.com/sight/p0/201403/07/fa3bace43953b4464b2251777579c147.jpg_200x200_b11a8b87.jpg',title:'宁乡灰汤紫龙湾温泉度假区',desc:'紫龙湾温泉一个是热情如火高温泉、一个是天然清凉冷温泉，冰火两重天，冷热交替沐浴，有如日月同辉。'},
	// 			{id:'0003',imgUrl:'http://img1.qunarzz.com/sight/p0/1809/e5/e557eddf1b11c017a3.img.jpg_200x200_7a3d492d.jpg',title:'新华联铜官窑古镇',desc:'彩色的溶洞里水汽氤氲，又像仙境，又像武侠小说里大侠们的“练功房”，你也可以修炼一个“养生大法”哦。'},
	// 			{id:'0004',imgUrl:'http://img1.qunarzz.com/sight/p0/1611/20/205db6ee32a4a29ba3.water.jpg_200x200_0ce2204c.jpg',title:'湖南省森林植物园',desc:'蓝天碧水、杂花生树。这里有4000多个品种的植物和动物，稀有的花木和珍贵的动物在这个人间天堂自由生长。'}

	// 		]
	// 	}
	// }
}
</script>
<style lang="stylus" scoped>
	@import '~styles/mixins.styl'
	.title
		line-height:.8rem
		margin-top:.2rem
		background:#eee
		text-indent:.2rem
	.item
		display:flex
		height:1.9rem
		overflow:hidden
		.item-img
			 width:1.7rem
			 height:1.7rem
			 padding:.1rem
		.item-info
			flex:1
			padding:.1rem
			min-width:0
			.item-title
				line-height:.54rem
				font-size:.32rem
				ellipsis()
			.item-desc
				line-height:.4rem
				color:#ccc
				ellipsis()
			.item-button
				background:#ff9300
				padding:0 .1rem
				border-radius:.06rem
				color:#fff
				margin-top:.15rem
				line-height:.44rem
</style>